﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Quanlytruongtruongtieuhoc
{
    public partial class frmIndanhsachchunhiem : Form
    {
        public frmIndanhsachchunhiem()
        {
            InitializeComponent();
        }

        private void frmIndanhsachchunhiem_Load(object sender, EventArgs e)
        {
            try
            {
                SqlDataAdapter ap = new SqlDataAdapter("SELECT GIAO_VIEN.MA_GV, GIAO_VIEN.HO, GIAO_VIEN.TEN, GIAO_VIEN.GIOI_TINH, CONVERT(char(10), GIAO_VIEN.NAM_SINH, 103) AS NAM_SINH, CHU_NHIEM.NAM_HOC, CHU_NHIEM.MA_KHOI, CHU_NHIEM.MA_LOP FROM CHU_NHIEM INNER JOIN GIAO_VIEN ON CHU_NHIEM.MA_GV = GIAO_VIEN.MA_GV", clsKetnoi.con);
                dtMatkhau cn = new dtMatkhau();
                ap.Fill(cn.dataTableChunhiem1);
                inDanhsachchunhiem rp = new inDanhsachchunhiem();
                rp.SetDataSource(cn);
                viewIndanhsach.ReportSource = rp;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
